package sudroid;

import java.io.Serializable;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.LinkedList;
import java.util.List;
import java.util.regex.Pattern;

public class TextUtils
{
  private static StringComparator stringComparator;
  private static StringComparatorIgnoreCase stringComparatorIgnoreCase = new StringComparatorIgnoreCase();

  static
  {
    stringComparator = new StringComparator();
  }

  public static boolean isBlankButNotEmpty(CharSequence paramCharSequence)
  {
    if ((paramCharSequence == null) || (paramCharSequence.length() == 0))
      throw new IllegalArgumentException();
    return Pattern.matches("\\s*", paramCharSequence);
  }

  public static boolean isEmpty(CharSequence paramCharSequence)
  {
    if ((paramCharSequence != null) && (paramCharSequence.toString().length() != 0));
    for (int i = 0; ; i = 1)
      return i;
  }

  public static boolean isEmptyOrBlank(CharSequence paramCharSequence)
  {
    if ((!isEmpty(paramCharSequence)) && (paramCharSequence.toString().trim().length() != 0));
    for (int i = 0; ; i = 1)
      return i;
  }

  public static boolean isOnlyNumbers(CharSequence paramCharSequence)
  {
    AssertUtil.checkStringNullOrEmpty(paramCharSequence);
    return Pattern.matches("\\s*\\d+\\s*", paramCharSequence);
  }

  public static int showCharNum(String paramString, char paramChar)
  {
    int i = 0;
    char[] arrayOfChar;
    int j;
    int k;
    if (!isEmpty(paramString))
    {
      arrayOfChar = paramString.toCharArray();
      j = 0;
      k = arrayOfChar.length;
    }
    while (true)
    {
      if (j >= k)
        return i;
      char c = arrayOfChar[j];
      if (paramChar == c)
        i += 1;
      j += 1;
    }
  }

  public static String showControlCharacters(String paramString)
  {
    char[] arrayOfChar = paramString.toCharArray();
    int i = paramString.length();
    StringBuilder localStringBuilder1 = new StringBuilder(i);
    int j = 0;
    int k = arrayOfChar.length;
    if (j >= k)
      return localStringBuilder1.toString();
    if ((arrayOfChar[j] == '') || ((arrayOfChar[j] >= 0) && (arrayOfChar[j] <= ' ')))
    {
      StringBuilder localStringBuilder2 = localStringBuilder1.append("[\\u");
      int m = arrayOfChar[j];
      StringBuilder localStringBuilder3 = localStringBuilder2.append(m).append("]");
    }
    while (true)
    {
      j += 1;
      break;
      StringBuilder localStringBuilder4 = localStringBuilder1.append("[");
      char c = arrayOfChar[j];
      StringBuilder localStringBuilder5 = localStringBuilder4.append(c).append("]");
    }
  }

  public static List<String> sort(List<String> paramList)
  {
    AssertUtil.checkCollectionNullOrEmpty(paramList);
    StringComparator localStringComparator = stringComparator;
    Collections.sort(paramList, localStringComparator);
    return paramList;
  }

  public static String[] sort(String[] paramArrayOfString)
  {
    AssertUtil.checkArrayNullOrEmpty(paramArrayOfString);
    StringComparator localStringComparator = stringComparator;
    Arrays.sort(paramArrayOfString, localStringComparator);
    return paramArrayOfString;
  }

  public static List<String> sortIgnoreCase(List<String> paramList)
  {
    AssertUtil.checkCollectionNullOrEmpty(paramList);
    StringComparatorIgnoreCase localStringComparatorIgnoreCase = stringComparatorIgnoreCase;
    Collections.sort(paramList, localStringComparatorIgnoreCase);
    return paramList;
  }

  public static String[] sortIgnoreCase(String[] paramArrayOfString)
  {
    AssertUtil.checkArrayNullOrEmpty(paramArrayOfString);
    StringComparatorIgnoreCase localStringComparatorIgnoreCase = stringComparatorIgnoreCase;
    Arrays.sort(paramArrayOfString, localStringComparatorIgnoreCase);
    return paramArrayOfString;
  }

  public static String[] splitTrim(String paramString1, String paramString2)
  {
    return trim(paramString1.split(paramString2));
  }

  public static String[] trim(String[] paramArrayOfString)
  {
    AssertUtil.checkArrayNullOrEmpty(paramArrayOfString);
    int i = paramArrayOfString.length;
    LinkedList localLinkedList = new LinkedList();
    int j = 0;
    if (j >= i)
    {
      String[] arrayOfString = new String[0];
      return (String[])localLinkedList.toArray(arrayOfString);
    }
    String str = paramArrayOfString[j].trim();
    if (isEmptyOrBlank(str));
    while (true)
    {
      j += 1;
      break;
      boolean bool = localLinkedList.add(str);
    }
  }

  class StringComparator
    implements Comparator<String>, Serializable
  {
    private static final long serialVersionUID = 4900701236481733031L;

    public int compare(String paramString1, String paramString2)
    {
      return paramString1.compareTo(paramString2);
    }
  }

  class StringComparatorIgnoreCase
    implements Comparator<String>, Serializable
  {
    private static final long serialVersionUID = -7885288744567606076L;

    public int compare(String paramString1, String paramString2)
    {
      return paramString1.compareToIgnoreCase(paramString2);
    }
  }
}

/* Location:           D:\Program Files\eclipse\apktool-r01-3\新浪微博\classes.dex.dex2jar.jar
 * Qualified Name:     sudroid.TextUtils
 * JD-Core Version:    0.6.0
 */